<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FlashUpload.aspx.cs" Inherits="FlashUpload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <%--
        
        Adding the flash uploader to the page.  <param name="wmode" value="transparent"> makes
        the movie transparent so any page styling can shine through.
        FlashVars is set to pass in the upload page and a javascript function if desired.
        The javascript function fires when the upload is completed.  This allows us to 
        call a codebehind function to refresh a gridView or anything else.
        A link button is used to perform this function.  The javascript is added in the pageLoad 
        in the code behin.
        To edit the flash file, Adobe/Macromedia has a 30-day trial of Macromedia Flash
        for download.  After that, you're on your own.
        --%>
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
         codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
         width="575" height="375" id="fileUpload" align="middle">
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="movie" value="images/FlashFileUpload.swf" />
            <param name="quality" value="high" />
            <param name="wmode" value="transparent">
            <PARAM NAME=FlashVars VALUE='uploadPage=MultiFlashUpload.axd<%=GetFlashVars()%>&completeFunction=UploadComplete()'>
            <embed src="images/FlashFileUpload.swf"
             FlashVars='uploadPage=MultiFlashUpload.axd<%=GetFlashVars()%>&completeFunction=UploadComplete()'
             quality="high" wmode="transparent" width="575" height="375" 
             name="fileUpload" align="middle" allowScriptAccess="sameDomain" 
             type="application/x-shockwave-flash" 
             pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object>
        <%--This link button is here so we can call the LinkButton1_Click even from javascript.
            Make the text empty so the link doesn't show up on the page.--%>
        <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click"></asp:LinkButton>
    </div>
    </form>
</body>
</html>
